home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / g_man / cat3 / OpenGL / glunurbssurface.z / glunurbssurface
Encoding:
Text File  |  2001-04-17  |  8.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee((((3333GGGG))))            OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee            gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee - define the shape of a NURBS surface
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      void gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee( GLUnurbs* _n_u_r_b,
  14.                            GLint _s_K_n_o_t_C_o_u_n_t,
  15.                            GLfloat* _s_K_n_o_t_s,
  16.                            GLint _t_K_n_o_t_C_o_u_n_t,
  17.                            GLfloat* _t_K_n_o_t_s,
  18.                            GLint _s_S_t_r_i_d_e,
  19.                            GLint _t_S_t_r_i_d_e,
  20.                            GLfloat* _c_o_n_t_r_o_l,
  21.                            GLint _s_O_r_d_e_r,
  22.                            GLint _t_O_r_d_e_r,
  23.                            GLenum _t_y_p_e )
  24.  
  25.  
  26. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  27.      _n_u_r_b        Specifies the NURBS object (created with
  28.                  gggglllluuuuNNNNeeeewwwwNNNNuuuurrrrbbbbssssRRRReeeennnnddddeeeerrrreeeerrrr).
  29.  
  30.      _s_K_n_o_t_C_o_u_n_t  Specifies the number of knots in the parametric _u direction.
  31.  
  32.      _s_K_n_o_t_s      Specifies an array of _s_K_n_o_t_C_o_u_n_t nondecreasing knot values in
  33.                  the parametric _u direction.
  34.  
  35.      _t_K_n_o_t_C_o_u_n_t  Specifies the number of knots in the parametric _v direction.
  36.  
  37.      _t_K_n_o_t_s      Specifies an array of _t_K_n_o_t_C_o_u_n_t nondecreasing knot values in
  38.                  the parametric _v direction.
  39.  
  40.      _s_S_t_r_i_d_e     Specifies the offset (as a number of single-precision
  41.                  floating point values) between successive control points in
  42.                  the parametric _u direction in _c_o_n_t_r_o_l.
  43.  
  44.      _t_S_t_r_i_d_e     Specifies the offset (in single-precision floating-point
  45.                  values) between successive control points in the parametric _v
  46.                  direction in _c_o_n_t_r_o_l.
  47.  
  48.      _c_o_n_t_r_o_l     Specifies an array containing control points for the NURBS
  49.                  surface.  The offsets between successive control points in
  50.                  the parametric _u and _v directions are given by _s_S_t_r_i_d_e and
  51.                  _t_S_t_r_i_d_e.
  52.  
  53.      _s_O_r_d_e_r      Specifies the order of the NURBS surface in the parametric _u
  54.                  direction. The order is one more than the degree, hence a
  55.                  surface that is cubic in _u has a _u order of 4.
  56.  
  57.      _t_O_r_d_e_r      Specifies the order of the NURBS surface in the parametric _v
  58.                  direction. The order is one more than the degree, hence a
  59.                  surface that is cubic in _v has a _v order of 4.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee((((3333GGGG))))            OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee            gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      _t_y_p_e        Specifies type of the surface. _t_y_p_e can be any of the valid
  75.                  two-dimensional evaluator types (such as GGGGLLLL____MMMMAAAAPPPP2222____VVVVEEEERRRRTTTTEEEEXXXX____3333 or
  76.                  GGGGLLLL____MMMMAAAAPPPP2222____CCCCOOOOLLLLOOOORRRR____4444).
  77.  
  78. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  79.      Use gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee within a NURBS (Non-Uniform Rational B-Spline)
  80.      surface definition to describe the shape of a NURBS surface (before any
  81.      trimming). To mark the beginning of a NURBS surface definition, use the
  82.      gggglllluuuuBBBBeeeeggggiiiinnnnSSSSuuuurrrrffffaaaacccceeee command.  To mark the end of a NURBS surface definition,
  83.      use the gggglllluuuuEEEEnnnnddddSSSSuuuurrrrffffaaaacccceeee command. Call gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee within a NURBS
  84.      surface definition only.
  85.  
  86.      Positional, texture, and color coordinates are associated with a surface
  87.      by presenting each as a separate gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee between a
  88.      gggglllluuuuBBBBeeeeggggiiiinnnnSSSSuuuurrrrffffaaaacccceeee/gggglllluuuuEEEEnnnnddddSSSSuuuurrrrffffaaaacccceeee pair. No more than one call to
  89.      gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee for each of color, position, and texture data can be made
  90.      within a single gggglllluuuuBBBBeeeeggggiiiinnnnSSSSuuuurrrrffffaaaacccceeee/gggglllluuuuEEEEnnnnddddSSSSuuuurrrrffffaaaacccceeee pair. Exactly one call must
  91.      be made to describe the position of the surface (a _t_y_p_e of
  92.      GGGGLLLL____MMMMAAAAPPPP2222____VVVVEEEERRRRTTTTEEEEXXXX____3333 or GGGGLLLL____MMMMAAAAPPPP2222____VVVVEEEERRRRTTTTEEEEXXXX____4444).
  93.  
  94.      A NURBS surface can be trimmed by using the commands gggglllluuuuNNNNuuuurrrrbbbbssssCCCCuuuurrrrvvvveeee and
  95.      gggglllluuuuPPPPwwwwllllCCCCuuuurrrrvvvveeee between calls to gggglllluuuuBBBBeeeeggggiiiinnnnTTTTrrrriiiimmmm and gggglllluuuuEEEEnnnnddddTTTTrrrriiiimmmm.
  96.  
  97.      Note that a gggglllluuuuNNNNuuuurrrrbbbbssssSSSSuuuurrrrffffaaaacccceeee with _s_K_n_o_t_C_o_u_n_t knots in the _u direction and
  98.      _t_K_n_o_t_C_o_u_n_t knots in the _v direction with orders _s_O_r_d_e_r and _t_O_r_d_e_r must
  99.      have (_s_K_n_o_t_C_o_u_n_t - _s_O_r_d_e_r) x (_t_K_n_o_t_C_o_u_n_t - _t_O_r_d_e_r) control points.
  100.  
  101. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  102.      The following commands render a textured NURBS surface with normals; the
  103.      texture coordinates and normals are also NURBS surfaces:
  104.  
  105.  
  106.           gluBeginSurface(nobj);
  107.              gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
  108.              gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
  109.              gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4);
  110.           gluEndSurface(nobj);
  111.  
  112.  
  113.  
  114. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  115.      gggglllluuuuBBBBeeeeggggiiiinnnnSSSSuuuurrrrffffaaaacccceeee, gggglllluuuuBBBBeeeeggggiiiinnnnTTTTrrrriiiimmmm, gggglllluuuuNNNNeeeewwwwNNNNuuuurrrrbbbbssssRRRReeeennnnddddeeeerrrreeeerrrr, gggglllluuuuNNNNuuuurrrrbbbbssssCCCCuuuurrrrvvvveeee,
  116.      gggglllluuuuPPPPwwwwllllCCCCuuuurrrrvvvveeee
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.